import { createRouter, createWebHistory } from 'vue-router'
import JobManagementView from '../views/JobManagementView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'job-management',
      component: JobManagementView,
    },
    {
      path: '/job-detail/:id',
      name: 'job-detail',
      component: () => import('../views/JobDetailView.vue'),
    },
    {
      path: '/job-logs/:id',
      name: 'job-logs',
      component: () => import('../views/JobLogsView.vue'),
    },
    {
      path: '/thread-pool-monitor',
      name: 'thread-pool-monitor',
      component: () => import('../views/ThreadPoolMonitorView.vue'),
    },
    {
      path: '/executor-runtime',
      name: 'executor-runtime',
      component: () => import('../views/ExecutorRuntimeView.vue'),
    },
    {
      path: '/environment-monitor',
      name: 'environment-monitor',
      component: () => import('../views/EnvironmentMonitorView.vue'),
    },
    {
      path: '/environment-monitor/:registerKey',
      name: 'environment-monitor-detail',
      component: () => import('../views/EnvironmentMonitorDetailView.vue'),
    },
    {
      path: '/dashboard',
      name: 'dashboard',
      component: () => import('../views/DashboardView.vue'),
    },
    {
      path: '/executor-detail/:registerKey',
      name: 'executor-detail',
      component: () => import('../views/ExecutorDetailView.vue'),
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue'),
    },
  ],
})

export default router
